home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / etc / bash_completion.d / mysqladmin < prev    next >
Encoding:
Text File  |  2010-11-16  |  2.2 KB  |  72 lines

  1. # bash completion for mysqladmin
  2.  
  3. have mysqladmin &&
  4. _mysqladmin()
  5. {
  6.     local cur prev split=false
  7.  
  8.     COMPREPLY=()
  9.     _get_comp_words_by_ref cur prev
  10.  
  11.     _split_longopt && split=true
  12.  
  13.     case $prev in
  14.         -u|--user)
  15.             COMPREPLY=( $( compgen -u -- "$cur" ) )
  16.             return 0
  17.             ;;
  18.         -h|--host)
  19.             _known_hosts_real "$cur"
  20.             return 0
  21.             ;;
  22.         --character-sets-dir|--ssl-capath)
  23.             _filedir -d
  24.             return 0
  25.             ;;
  26.         -S|--socket)
  27.             _filedir sock
  28.             return 0
  29.             ;;
  30.         --defaults-file|--defaults-extra-file)
  31.             _filedir
  32.             return 0
  33.             ;;
  34.         -c|--count|--default-character-set|-P|--port|-O|--set-variable|\
  35.         -i|--sleep|--ssl-ca|--ssl-cert|--ssl-cipher|--ssl-key|-w|--wait|\
  36.         --connect_timeout|--shutdown_timeout)
  37.             # Argument required but no completions available
  38.             return 0
  39.             ;;
  40.         '-?'|--help|-V|--version)
  41.             # All other options are noop with these
  42.             return 0
  43.             ;;
  44.     esac
  45.  
  46.     $split && return 0
  47.  
  48.     COMPREPLY=( $( compgen -W '--count --debug-check --debug-info --force \
  49.         --compress --character-sets-dir --default-character-set --help --host \
  50.         --no-beep --password --port --protocol --relative --set-variable \
  51.         --silent --socket --sleep --ssl --ssl-ca --ssl-capath --ssl-cert \
  52.         --ssl-cipher --ssl-key --ssl-verify-server-cert --user --verbose \
  53.         --version --vertical --wait --connect_timeout --shutdown_timeout \
  54.         --print-defaults --no-defaults --defaults-file --defaults-extra-file' \
  55.         -- "$cur" ) )
  56.  
  57.     COMPREPLY=( "${COMPREPLY[@]}" \
  58.         $( compgen -W 'create debug drop extended-status flush-hosts \
  59.         flush-logs flush-status flush-tables flush-threads flush-privileges \
  60.         kill password old-password ping processlist reload refresh shutdown \
  61.         status start-slave stop-slave variables version' -- "$cur" ) )
  62. } &&
  63. complete -F _mysqladmin -o filenames mysqladmin
  64.  
  65. # Local variables:
  66. # mode: shell-script
  67. # sh-basic-offset: 4
  68. # sh-indent-comment: t
  69. # indent-tabs-mode: nil
  70. # End:
  71. # ex: ts=4 sw=4 et filetype=sh
  72.